import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import './styles/indes.scss'
import 'virtual:svg-icons-register' // 引入注册脚本
import SvgIcon from '@/components/svgIcon/index.vue' // 引入组件
import appBox from '@/components/block/box.vue' // 引入组件
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as echarts from "echarts"
import SocketService from '@/api/websocket';

// **main.js**
import vue3SeamlessScroll from "vue3-seamless-scroll"; // 引入组件
import dayjs from 'dayjs';
// import VideoPlayer from 'vue-video-player/src'
// import 'video.js/dist/video-js.css' 
// import 'vue-video-player/src/custom-theme.css'


const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.config.globalProperties.$ws = SocketService.Instance;
app.component('svg-icon', SvgIcon)
app.component('app-box', appBox)

// app.use(VideoPlayer)
app.use(router)
app.use(store)
app.use(vue3SeamlessScroll);
app.use(ElementPlus, {
  locale: zhCn,
})
app.config.globalProperties.$echarts = echarts
app.config.globalProperties.day = dayjs
app.mount("#app");